Skip to content

Connect push packets to update reporting - #547

Open
JusterZhu wants to merge 2 commits into
justerzhu-upgrade-report-record-typefrom
justerzhu-push-client-record-integration
Open

JusterZhu wants to merge 2 commits into
justerzhu-upgrade-report-record-typefrom
justerzhu-push-client-record-integration

Conversation

@JusterZhu

@JusterZhu JusterZhu commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Parse flat SignalR packets with source-generated JSON and expose a per-message push download source with explicit AppType and push RecordId.
  • Route push reports as Type 2 through Client and updater IPC; old packets without an ID can still update but do not send record reports.
  • Support full-only download plans and document host validation, tenant headers, and update scheduling requirements.

Validation

  • 74 targeted push, report routing, and download plan tests passed; core builds for all target frameworks.
  • Windows Native AOT CI publishes and executes a smoke application covering push JSON, source registration, plan construction, legacy packets and IPC serialization.
  • Tenant header propagation was exercised with an in-process HTTP handler; real SignalR, authenticated file download and report endpoint integration remain to be verified against GeneralSpace.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 22, 2026 15:58
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Inconsistent null AppType grouping can cause duplicate Client full-package downloads and replacements, while a stale push report type can misclassify subsequent polling reports and IPC.

2 open issues
What changed in this PR

Connects SignalR push packets to the existing download and update-reporting workflow, including report routing to the separate updater process.

Changes:

  • Adds a per-message push download source and payload fields, using source-generated JSON parsing.
  • Routes push reports as Type 2 and suppresses record reports for legacy packets without an ID.
  • Supports full-only download plans, adds targeted tests, and documents host integration requirements.
File Description
tests/​CoreTest/​Strategy/​ReportRoutingTests.cs Tests push report routing, missing IDs, and in-process tenant headers.
tests/​CoreTest/​Download/​PushDownloadSourceTests.cs Tests packet validation, mapping, cancellation, and full-only plans.
src/​GeneralUpdate.Core/​Strategy/​UpdateStrategy.cs Suppresses final push reports without a record ID.
src/​GeneralUpdate.Core/​Strategy/​ClientStrategy.cs Selects push report type and guards reports without IDs.
src/​GeneralUpdate.Core/​Strategy/​AbstractStrategy.cs Skips per-record push reports with invalid IDs.
src/​GeneralUpdate.Core/​Download/​Sources/​PushDownloadSource.cs Parses and validates a push packet into a download source.
src/​GeneralUpdate.Core/​Download/​DownloadPlanBuilder.cs Selects the latest full package per application type for full-only plans.
src/​GeneralUpdate.Core/​Configuration/​PushPayload.cs Adds record ID, size, package type, and format fields.
src/​GeneralUpdate.Core/​Configuration/​AbstractBootstrap.cs Allows registration of a preconstructed download source.
docs/​core-execution-flow.md Documents push integration, validation, tenant headers, and scheduling responsibilities.

Review effort: Balanced

if (chainCandidates.Count == 0 && fullCandidates.Count > 0)
{
var latestFulls = fullCandidates
.GroupBy(a => a.AppType)
Comment on lines +438 to +439
_reportType = 2;
_configInfo.ReportType = 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants